package com.yunke.entity.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;

/**
 * 管理员信息DTO
 * 
 * @author yunke
 * @since 1.0.0
 */
@Data
@Schema(name = "YunkeAdminDto", description = "管理员信息DTO")
public class YunkeAdminDto {

    @Schema(description = "管理员ID")
    private Long id;

    @NotBlank(message = "用户名不能为空")
    @Size(min = 3, max = 20, message = "用户名长度在3-20个字符")
    @Pattern(regexp = "^[a-zA-Z0-9_]+$", message = "用户名只能包含字母、数字和下划线")
    @Schema(description = "用户名", required = true)
    private String username;

    @Size(min = 6, max = 20, message = "密码长度在6-20个字符")
    @Schema(description = "密码")
    private String password;

    @NotBlank(message = "昵称不能为空")
    @Size(max = 50, message = "昵称长度不能超过50个字符")
    @Schema(description = "昵称", required = true)
    private String nickname;

    @Schema(description = "头像")
    private String avatar;

    @Email(message = "邮箱格式不正确")
    @Schema(description = "邮箱")
    private String email;

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @Schema(description = "手机号")
    private String mobile;

    @Schema(description = "角色ID列表")
    private String roleIds;

    @Schema(description = "部门ID")
    private Long departmentId;

    @Schema(description = "职位")
    private String position;

    @Schema(description = "账户状态（0正常 1禁用 2锁定）")
    private Integer accountStatus;

    @Schema(description = "备注")
    private String remark;
} 